import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsBoolean, IsEmail, IsNotEmpty, IsNumber, IsPhoneNumber, IsString } from 'class-validator';
import { ShareDto } from './share.dto';

export class RoleDto extends ShareDto {
  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '角色名称名',
    example: 'roleName'
  })
  roleName: string;

  // validator
  @IsString()
  //swagger
  @ApiProperty({
    description: '角色简介',
    example: '我是角色描述'
  })
  description: string;

  // validator
  @IsBoolean()
  //swagger
  @ApiProperty({
    description: '角色开关',
    example: true
  })
  off: boolean;

  // validator
  @IsArray()
  //swagger
  @ApiProperty({
    description: '角色菜单列表',
    example: []
  })
  limits: [];
}